package com.zzw.grpc;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.68.1)",
    comments = "Source: grpc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class RecEverGrpc {

  private RecEverGrpc() {}

  public static final String SERVICE_NAME = "RecEver";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<RecEverything.RecEveRequest,
      RecEverything.RecEveResponse> getRecEveMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "RecEve",
      requestType = RecEverything.RecEveRequest.class,
      responseType = RecEverything.RecEveResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<RecEverything.RecEveRequest,
      RecEverything.RecEveResponse> getRecEveMethod() {
    io.grpc.MethodDescriptor<RecEverything.RecEveRequest, RecEverything.RecEveResponse> getRecEveMethod;
    if ((getRecEveMethod = RecEverGrpc.getRecEveMethod) == null) {
      synchronized (RecEverGrpc.class) {
        if ((getRecEveMethod = RecEverGrpc.getRecEveMethod) == null) {
          RecEverGrpc.getRecEveMethod = getRecEveMethod =
              io.grpc.MethodDescriptor.<RecEverything.RecEveRequest, RecEverything.RecEveResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecEve"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  RecEverything.RecEveRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  RecEverything.RecEveResponse.getDefaultInstance()))
              .setSchemaDescriptor(new RecEverMethodDescriptorSupplier("RecEve"))
              .build();
        }
      }
    }
    return getRecEveMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static RecEverStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RecEverStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RecEverStub>() {
        @Override
        public RecEverStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RecEverStub(channel, callOptions);
        }
      };
    return RecEverStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static RecEverBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RecEverBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RecEverBlockingStub>() {
        @Override
        public RecEverBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RecEverBlockingStub(channel, callOptions);
        }
      };
    return RecEverBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static RecEverFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<RecEverFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<RecEverFutureStub>() {
        @Override
        public RecEverFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new RecEverFutureStub(channel, callOptions);
        }
      };
    return RecEverFutureStub.newStub(factory, channel);
  }

  /**
   */
  public interface AsyncService {

    /**
     */
    default void recEve(RecEverything.RecEveRequest request,
                        io.grpc.stub.StreamObserver<RecEverything.RecEveResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecEveMethod(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service RecEver.
   */
  public static abstract class RecEverImplBase
      implements io.grpc.BindableService, AsyncService {

    @Override public final io.grpc.ServerServiceDefinition bindService() {
      return RecEverGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service RecEver.
   */
  public static final class RecEverStub
      extends io.grpc.stub.AbstractAsyncStub<RecEverStub> {
    private RecEverStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected RecEverStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RecEverStub(channel, callOptions);
    }

    /**
     */
    public void recEve(RecEverything.RecEveRequest request,
                       io.grpc.stub.StreamObserver<RecEverything.RecEveResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getRecEveMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service RecEver.
   */
  public static final class RecEverBlockingStub
      extends io.grpc.stub.AbstractBlockingStub<RecEverBlockingStub> {
    RecEverBlockingStub(
            io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected RecEverBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RecEverBlockingStub(channel, callOptions);
    }

    /**
     */
    public RecEverything.RecEveResponse recEve(RecEverything.RecEveRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getRecEveMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service RecEver.
   */
  public static final class RecEverFutureStub
      extends io.grpc.stub.AbstractFutureStub<RecEverFutureStub> {
    private RecEverFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @Override
    protected RecEverFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new RecEverFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<RecEverything.RecEveResponse> recEve(
        RecEverything.RecEveRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getRecEveMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_REC_EVE = 0;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final AsyncService serviceImpl;
    private final int methodId;

    MethodHandlers(AsyncService serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @Override
    @SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_REC_EVE:
          serviceImpl.recEve((RecEverything.RecEveRequest) request,
              (io.grpc.stub.StreamObserver<RecEverything.RecEveResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @Override
    @SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
        .addMethod(
          getRecEveMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              RecEverything.RecEveRequest,
              RecEverything.RecEveResponse>(
                service, METHODID_REC_EVE)))
        .build();
  }

  private static abstract class RecEverBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    RecEverBaseDescriptorSupplier() {}

    @Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return RecEverything.getDescriptor();
    }

    @Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("RecEver");
    }
  }

  private static final class RecEverFileDescriptorSupplier
      extends RecEverBaseDescriptorSupplier {
    RecEverFileDescriptorSupplier() {}
  }

  private static final class RecEverMethodDescriptorSupplier
      extends RecEverBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    RecEverMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (RecEverGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new RecEverFileDescriptorSupplier())
              .addMethod(getRecEveMethod())
              .build();
        }
      }
    }
    return result;
  }
}
